<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../../js/vue.js"></script>
    <style>
        [v-cloak] {
            display: none;
        }
    </style>
</head>

<body>

    <dvi id="app">
        <div :data-score="score" v-if="score>=90">优秀</div>
        <div :data-score="score" v-else-if="score>=80 && score <90">良好</div>
        <div :data-score="score" v-else-if="score>=60 && score <80">一般</div>
        <div :data-score="score" v-else>不及格</div>
        <button @click="handle1">偷偷加分-_-!</button>

        <div v-show="flag">偷偷出来了</div>
        <button @click="handle">偷偷的。。。</button>

    </dvi>

    <script>
        var vm = new Vue({
            el: "#app",
            data: {
                score: 40,
                flag: false
            },
            methods: {
                handle1() {
                    this.score += 10;
                },
                handle() {
                    this.flag = !this.flag
                }
            }
        })
    </script>
</body>

</html>